<?php

namespace app\admin\controller;

use app\model\system\SystemMenus;
use think\db\exception\DataNotFoundException;
use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException;

/**
 * 入口类
 * Class IndexController
 * @package app\admin\controller
 */
class IndexController extends AuthController
{
    /**
     * 首页
     * Author: Albert3306
     * Date: 2021/4/26
     * @return string
     * @throws DataNotFoundException
     * @throws DbException
     * @throws ModelNotFoundException
     */
    public function index(): string
    {
        return $this->fetch('index/index', [
            'site_logo' => '',
            'menuList' => SystemMenus::menuList(),
        ]);
    }

    /**
     * 首页内容
     * Author: Albert3306
     * Date: 2021/4/26
     * @return string
     */
    public function main(): string
    {
        return $this->fetch('index/main');
    }
}